<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.mydiv{
				width: 300px;
				height: 300px;
				background-color: blue;
				color: white;
				margin: 0 auto;/*让div在网页上居中*/
				text-align: center;/*文字居中对齐*/
			}
			.uname{
				width: 420px;
				height: 35px;
				border-radius: 5px;
				border:1px solid red;/*边框宽度1像素，实线，红色边框*/
				background-color: azure;
				/*border:2px dotted black;虚线边框*/
			}
		</style>
	</head>
	<body>
		<h1>背景样式</h1>
		<div class="mydiv">
			今天天气不错
		</div>
		<input type="text" style="background-color: red;"/>
		<h1>边框样式</h1>
		用户名<input type="text" class="uname">
	</body>
</html>